package cn.com.czpb.client.model.usercenter;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.google.gson.annotations.SerializedName;
import cn.com.czpb.client.model.news.NewsBean;

import java.util.List;

/**
 * Created by Administrator on 2017/7/11.
 */

public class CollectBean implements MultiItemEntity {

    /**
     * count : 3
     * list : [{"id":"1","type":"1","datetime":"2008-05-30 12:20:12","data":{"contentid":"36","title":"对谈Google X实验室创始人塞巴斯蒂安·特伦","update_time":"2015-12-14 10:38:13","rtype":"1","copyfrom":"测试来源","type":"2","imgs":["http://www.99cms_zqzx.com/private/Uploads/thumb/s_1450060610.jpg"]}},{"id":"2","type":"2","datetime":"2008-05-30 12:20:12","data":{"contentid":"63","title":"测试图集","update_time":"2015-12-01 12:07:46","imgs":["http://www.99cms_zqzx.com/private/Uploads/photo/l_1448943562.jpg","http://www.99cms_zqzx.com/private/Uploads/photo/l_1448943552.jpg","http://www.99cms_zqzx.com/private/Uploads/photo/l_1448943542.jpg"],"rtype":"0","copyfrom":"","type":"4"}},{"id":"3","type":"3","datetime":"2008-05-30 12:20:12","data":{"contentid":"4","title":"测试视频2","update_time":"2015-12-11 14:38:16","imgs":["http://www.99cms_zqzx.com/private/Uploads/screenshot/1449815896.jpg"],"rtype":"0","type":"2","copyfrom":""}}]
     */

    /**
     * id : 1
     * type : 1
     * datetime : 2008-05-30 12:20:12
     * data : {"contentid":"36","title":"对谈Google X实验室创始人塞巴斯蒂安·特伦","update_time":"2015-12-14 10:38:13","rtype":"1","copyfrom":"测试来源","type":"2","imgs":["http://www.99cms_zqzx.com/private/Uploads/thumb/s_1450060610.jpg"]}
     */

    @SerializedName("id")
    private String id;
    @SerializedName("type")
    private String type;
    @SerializedName("datetime")
    private String datetime;
    @SerializedName("data")
    private DataEntity data;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDatetime() {
        return datetime;
    }

    public void setDatetime(String datetime) {
        this.datetime = datetime;
    }

    public DataEntity getData() {
        return data;
    }

    public void setData(DataEntity data) {
        this.data = data;
    }

    @Override
    public int getItemType() {
        if ("4".equals(getData().getType())) {
            return NewsBean.THREEPIC;
        }
        if ("1".equals(getData().getType())) {
            return NewsBean.NOPIC;
        }
        if ("5".equals(getData().getType())) {
            return NewsBean.BIGPIC;
        } else {
            return NewsBean.LEFTPIC;
        }

    }

    public static class DataEntity {
        public String getContentid() {
            return contentid;
        }

        public void setContentid(String contentid) {
            this.contentid = contentid;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(String updateTime) {
            this.updateTime = updateTime;
        }

        public String getRtype() {
            return rtype;
        }

        public void setRtype(String rtype) {
            this.rtype = rtype;
        }

        public String getCopyfrom() {
            return copyfrom;
        }

        public void setCopyfrom(String copyfrom) {
            this.copyfrom = copyfrom;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public List<String> getImgs() {
            return imgs;
        }

        public void setImgs(List<String> imgs) {
            this.imgs = imgs;
        }

        /**
         * contentid : 36
         * title : 对谈Google X实验室创始人塞巴斯蒂安·特伦
         * update_time : 2015-12-14 10:38:13
         * rtype : 1
         * copyfrom : 测试来源
         * type : 2
         * imgs : ["http://www.99cms_zqzx.com/private/Uploads/thumb/s_1450060610.jpg"]
         */

        @SerializedName("rtype")
        private String rtype;
        @SerializedName("rvalue")
        private String rvalue;
        @SerializedName("contentid")
        private String contentid;
        private String tid;
        private String authorname;
        private String wemedia;
        private String title;
        @SerializedName("copyfrom")
        private String copyfrom;
        private String sort_order;
        private String status;
        @SerializedName("update_time")
        private String updateTime;
        @SerializedName("type")
        private String type;
        private String sid;
        private String comflag;
        private String flag_id;
        private String columnid;
        private String subtitle;
        @SerializedName("imgs")
        private List<String> imgs;

        @SerializedName("praisecount")
        private String praisecount;

        public String getPraisecount() {
            return praisecount;
        }

        public void setPraisecount(String praisecount) {
            this.praisecount = praisecount;
        }

        public String getNid() {
            return nid;
        }

        public void setNid(String nid) {
            this.nid = nid;
        }

        @SerializedName("nid")
        private String nid;


        private String newsurl;

        private String comcount;
        private String newsflag;

        public String getRvalue() {
            return rvalue;
        }

        public void setRvalue(String rvalue) {
            this.rvalue = rvalue;
        }

        public String getAuthorname() {
            return authorname;
        }

        public void setAuthorname(String authorname) {
            this.authorname = authorname;
        }

        public String getWemedia() {
            return wemedia;
        }

        public void setWemedia(String wemedia) {
            this.wemedia = wemedia;
        }

        public String getSort_order() {
            return sort_order;
        }

        public void setSort_order(String sort_order) {
            this.sort_order = sort_order;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getSid() {
            return sid;
        }

        public void setSid(String sid) {
            this.sid = sid;
        }

        public String getComflag() {
            return comflag;
        }

        public void setComflag(String comflag) {
            this.comflag = comflag;
        }

        public String getFlag_id() {
            return flag_id;
        }

        public void setFlag_id(String flag_id) {
            this.flag_id = flag_id;
        }

        public String getColumnid() {
            return columnid;
        }

        public void setColumnid(String columnid) {
            this.columnid = columnid;
        }

        public String getSubtitle() {
            return subtitle;
        }

        public void setSubtitle(String subtitle) {
            this.subtitle = subtitle;
        }

        public String getNewsurl() {
            return newsurl;
        }

        public void setNewsurl(String newsurl) {
            this.newsurl = newsurl;
        }

        public String getTid() {
            return tid;
        }

        public void setTid(String tid) {
            this.tid = tid;
        }

        public String getNewsflag() {
            return newsflag;
        }

        public void setNewsflag(String newsflag) {
            this.newsflag = newsflag;
        }

        public String getComcount() {
            return comcount;
        }

        public void setComcount(String comcount) {
            this.comcount = comcount;
        }


    }
}
